package com.css.common.core.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum DmdeploymentModeEnum {

    DEPLOYMENT_MODE_DEV("1", "开发环境（开发测试环境）"),

    DEPLOYMENT_MODE_TEST("2", "测试环境（预生产测试环境）"),

    DEPLOYMENT_MODE_PROD("3", "生产环境（正式环境）");

    private final String dm;

    private final String mc;


    public static String getMc(String dm) {
        DmdeploymentModeEnum res = Arrays.stream(values())
                .filter(x -> x.getDm().equals(dm))
                .findFirst().orElse(null);
        return res == null ? null : res.getMc();
    }
}
